home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / SprocketInvaders / Sprites / HowToEditSprites next >
Encoding:
Text File  |  2000-09-28  |  2.4 KB  |  23 lines  |  [TEXT/ttxt]

  1. Ok, in a nutshell here's how you edit the SprocketInvaders sprites.
  2.  
  3. You can use the program SpriteEditor to edit the actual sprite data files.  This is a VERY simple editor.  There are a few key commands that are not obvious.
  4.  
  5. For any action that involves color (eye dropper, pencil, fill, etc) holding down the Option key will use the background color instead of the foreground color.  So, if you use the eye dropper and Option-click you'll select a new background color.  If you use the pencil tool and Option-click you'll draw in the background color.
  6.  
  7. The Tab key will toggle between the current tool and the eye dropper.  This is very handy for quickly picking up a color and then going back to drawing.
  8.  
  9. The 'F' key will switch to the paint bucket (fill).  The '/' key will switch to the pencil.
  10.  
  11. The arrow keys will move the current viewable area (the flashing black box).
  12.  
  13. If you want to load a custom color table for editing the sprites then you can use the 'Load CLUT' menu command.  The CLUT you want to load must be a 256 entry 'clut' resource with ID 128.  There is a sample CLUT in the file SpriteCLUT.rsrc in the Sprites folder in the SprocketInvaders distribution.
  14.  
  15. Oh, the 'x' tool in the tool palette places the hot-spot for the sprite.  This is indicated by the flashing pixel square in the editor.
  16.  
  17. Sprite frames have a maximum size of 128x128.  The radio buttons at the bottom of the window set the zoom level, not the sprite size.  Sprites are always saved as a list of 128x128 frames.
  18.  
  19. So, you've made your art in the right CLUT and you've saved it all away in nice little sprite files.  Now, you've noticed that these file are HUGE because they take up 16K per frame.  So, drag-and-drop them on the other app called SpriteOptimizer.  This will trim each frame down to the minimum bounding box and save just those bits rather than the whole thing.  It doesn't do any run-length compression or other fancy stuff.  This is left as an exercise to the reader.  Oh, it DOES adjust the hot-spot for each frame for the cropped size so that everything works our right.  It makes a new file with the same name as the old one with a bullet '•' at the end of the name.  This is the one you want to include in your game.
  20.  
  21. Now, integrating this data into your resources and building it into the game is left as another exercise for the reader.   The original sprite data files for the CD controls are there and the code for adding them into the game is pretty self-explainatory.
  22.  
  23. Have fun.